const getOpenId = require('./getOpenId/index')
const getMiniProgramCode = require('./getMiniProgramCode/index')
const getLikeById = require('./getLikeById/index')
const getLikeRank = require('./getLikeRank/index')
const setLikeById = require('./setLikeById/index')

// 云函数入口函数
exports.main = async (event, context) => {
  switch (event.type) {
    case 'getOpenId':
      return await getOpenId.main(event, context)
    case 'getMiniProgramCode':
      return await getMiniProgramCode.main(event, context)
    case 'getLikeById':
      return await getLikeById.main(event, context)
    case 'getLikeRank':
      return await getLikeRank.main(event, context)
    case 'setLikeById':
      return await setLikeById.main(event, context)
  }
}